/**
 * Created by Administrator on 2017/8/17.
 */
import fetch from '@/utils/fetch'

const country = {
  state: {
    format:'yyyy/MM/dd'
  },
  mutations: {
    setCountry (state,value) {
      state = value;
    }
  },
  actions: {
    loadCountry (context) {
      httpClient.default(() => fetch({
        url: '/gi-paas-sd-countrysvc/api/object/country/lookup',
        method: 'put',
        data: {
          condition: {},
          number: 0,
          relation: 'and',
          size: 1,
          sortDirection: 'ASC',
          sortProperties: [

          ],
        },
      }), function(error, result) {
        context.commit('setCountry',result.list[0]);
      }, true);
    }
  },
  getters: {
    getCountry (state) {
      return state;
    }
  }
};

export default country;
